- content_for :title do
  %h1
    easyBacklog
    .description : Makes agencies agile

- if user_signed_in?
  - content_for :side_panel do
    %h2 Your accounts
    .your-list-side-panel
      - current_user.accounts.sort_by { |a| a.name.downcase }.each do |account|
        .account
          = link_to account.name, account_path(account)

  #home
    %h2.divider Latest activity across all accounts
    - if @recent_backlogs.empty?
      %p You do not have access to any backlogs yet.
      %br/
    - else
      - @recent_backlogs.each do |company_or_account, backlogs|
        .company
          = company_or_account_header company_or_account, 60
        %ul.backlog-list
          - backlogs.each do |backlog|
            %li
              .name
                = link_to truncate(backlog.name, :length => 60), account_backlog_path(backlog.account, backlog)
              .last-update= "last updated #{time_ago_in_words(backlog.updated_at)} ago by #{backlog.last_modified_user.name}"
              - if @recent_backlogs.length == 1 && backlogs.length == 1 && backlog.name =~ /^Example.*backlog$/
                = render :partial => '/accounts/first_project_bubble'
- else
  #home
    .sign-up
      %h2 Create an account
      %p
        Set up an account for free and start managing your backlogs.
      %p
        Features of easyBacklog include:
      %ul
        %li Rich application interface for managing your backlogs quickly
        %li Sprint planning and management
        %li Versioning and snapshots of your backlogs
        %li Export to Excel for sharing
        %li Print user story cards to share with your team
      = link_to "Create an account now", new_user_registration_url, { :class => 'button', :protocol => link_protocol }
    .or
      OR
    .login
      %h2 Log in
      = render :partial => '/devise/sessions/form'